How Good Are Branching Rules in DPLL?
نویسنده
چکیده
The Davis-Putnam-Logemann-Loveland algorithm is one of the most popular algorithms for solving the satis ability problem. Its e ciency depends on its choice of a branching rule. We construct a sequence of instances of the satis ability problem that fools a variety of \sensible" branching rules in the following sense: when the instance has n variables, each of the \sensible" branching rules brings about (2n=5) recursive calls of the Davis-PutnamLogemann-Loveland algorithm, even though only O(1) such calls are necessary. 1 The SAT problem A truth assignment is a mapping f that assigns 0 or 1 to each variable in its domain; we shall enumerate all the variables in this domain as x1; : : : ; xn. The complement xi of each such variable xi is de ned by f(xi) = 1 f(xi) for all truth assignments f ; both xi and xi are called literals; if u = xi then u = xi. A clause is a set of (distinct) literals and a formula is a family of (not necessarily distinct) clauses. A truth assignment satis es a clause if it maps at least one of its literals to 1; the assignment satis es a formula if and only if it satis es each of its clauses. A formula is called satis able if it is satis ed by at least one truth assignment; otherwise it is called unsatis able. The problem of recognizing satis able formulas is known as the satis ability problem, or SAT for short. 2 The Davis-Putnam-Logemann-Loveland algorithm Given a formula F and a literal u in F , we let Fju denote the \residual formula" arising from F when f(u) is set at 1: explicitly, this formula is obtained from F by removing all the clauses that contain u, deleting u from all the clauses that contain u, removing both u and u from the list of literals. Trivially, F is satis able if and only if at least one of Fju and Fju is satis able. It is customary to refer to the number of literals in a clause as the length (rather than size) of this clause. Clauses of lentgh one are called unit clauses. Trivially, if a formula F includes a unit clause fug, then every truth assignment f that satis es F must have f(u) = 1. Hence F is satis able if and only if Fju is satis able. A literal u in a formula F is called monotone if u appears in no clause of F . Trivially, if u is a monotone literal and if F is satis able, then F is satis ed by a truth assignment f such that f(u) = 1. Hence F is satis able if and only if Fju is satis able. These observations are the backbone of an algorithm for solving SAT, designed by Davis, Logemann, and Loveland [1] and evolved from an earlier proposal by Davis and Putnam [2]: see Figure 1. 3 Branching rules Each recursive call of DPLL may involve a choice of a literal u; algorithms for making these choices are referred to as branching rules. It is customary to represent each call of DPLL(F) by a node of a full binary tree: if a call represented by a node brings about calls of DPLL(Fju) and DPLL(Fju), then the call of DPLL(Fju) is represented by the left child of and the call of DPLL(Fju) is represented by the right child of , else is a leaf. The shape and size of this tree depends not only on the input formula F , but also on the branching rule B that is used; we shall let T (F ; B) denote the tree. { 2 { DPLL(F) { while (F includes a clause of length at most one) { if (F includes an empty clause) return UNSATISFIABLE; fvg = any clause of length one; F = Fjv; }while (there is a monotone literal) { v = any monotone literal; F = Fjv; }if (F is empty) return SATISFIABLE; choose a literal u in F; if (DPLL(Fju)=SATISFIABLE) return SATISFIABLE; if (DPLL(Fju)=SATISFIABLE) return SATISFIABLE; return UNSATISFIABLE; } Figure 1: De nition of the Davis-Putnam-Logemann-Loveland algorithm. To see how dramatically a choice of B can in uence the size of T (F ; B), take the formula with variables x1; x2; : : : ; xn and clauses fxi; xn 1; xng; fxi; xn 1; xng; fxi; xn 1; xng; fxi; xn 1; xng (i = 1; 2; : : : ; n 2); fxj; xj+1; xj+2; : : : ; xn 3; xn 2g (j = 1; 2; : : : ; n 3): It is easy to see that this formula, G, is unsatis able and that, with branching rules MIN: \let u be the variable with the smallest subscript", and MAX: \let u be the variable with the largest subscript", jT (G;MIN)j = 2n 1 1 but jT (G;MAX)j = 7. However, one might object that, unlike the branching rules commonly used in DPLL, both MIN and MAX are arti cial: they disregard the structure of the (residual) formula from which u is to be chosen. One branching rule that does not disregard the structure of the formula from which u is to be chosen has been proposed by Jeroslow and Wang [7]; it goes as follows. Let dk(F ; u) be the number of clauses of length k in F which contain u. The Jeroslow-Wang branching rule (JW) associates a weight with each literal u, { 3 { w(F ; u) =Xk 2 kdk(F ; u); and chooses the literal with the largest weight. (If there is a tie, then, among the literals with the largest weight, the literal with the smallest subscript is chosen.) In our example, w(G; xi) = ( 1=2 if i = 1; : : : ; n 2; (n 2)=4 if i = n 1 or n; w(G; xi) = 8><>: (2i 1)=2n 2 if i = 1; : : : ; n 3; (2n 3 1)=2n 2 if i = n 2; (n 2)=4 if i = n 1 or n: Therefore JW chooses xn 1. The residual formulas Gjxn 1 and Gjxn 1 are identical; their clauses are fxi; xng; fxi; xng (i = 1; 2; : : : ; n 2); fxj; xj+1; xj+2; : : : ; xn 3; xn 2g (j = 1; 2; : : : ; n 3): Therefore JW chooses xn for both Gjxn 1 and Gjxn 1. Since all of the resulting four residual formulas contain the empty clause, jT (G;JW)j = 7. This branching rule is based on the intuition that shorter clauses are more important than longer ones and, speci cally, that clauses of length k are twice as important as clauses of length k+1. (The idea of progressively halving the weighting factors was used by Johnson [8] some fteen years earlier in an approximation algorithm for MAX-SAT.) Hooker and Vinay [6] proposed a variation (HV) on JW, which they called \two-sided Jeroslow-Wang rule": among all the literals u such that w(F ; u) w(F ; u), choose one that maximizes w(F ; u) + w(F ; u). Van Gelder and Tsuji [10] proposed another variation (vGT): among all the literals u such that w(F ; u) w(F ; u), choose one that maximizes w(F ; u) w(F ; u). Dubois, Andre, Boufkhad, and Carlier [5] developed a program called C-SAT, which was shown to be one of the most e cient programs in solving the formulas from the DIMACS benchmarks [3]. Their branching rule (C-SAT) is as follows. De ne w(F ; u) =Xk ln 1 + 1 4k 2k+1 dk(F ; u) and W (F ; u) = w(F ; u) + X fu;vg2F w(F ; v) ; among all the literals u such that W (F ; u) W (F ; u), choose one that maximizes W (F ; u) +W (F ; u) + 1:5min(W (F ; u);W (F ; u)): These four branching rules, JW, HV, vGT, and C-SAT, share the following property. Sensible Property: If all clauses have length three and if v;w are literals such that d3(v) < d3(w); d3(v) < d3(w); then do not choose v. { 4 {4 Fooling a family of branching rulesTheorem. For every nonnegative integer t, there is an unsatis able formula H with 5t+21variables such that jT (H;MAX)j = 111, but jT (H;B)j > 2t for every branching rule B withthe Sensible Property.Proof. Write r = 5t and consider the following formula, Ht, with variables x1; : : : ; xr,: : : ; xr+21. For each s = 0; 1; : : : ; t 1, there are eight clauses involving x5s+1, x5s+2, x5s+3,x5s+4, x5s+5 and their complements,fx5s+1; x5s+2; x5s+3g; fx5s+1; x5s+3; x5s+4g; fx5s+1; x5s+4; x5s+5g; fx5s+1; x5s+2; x5s+5gandfx5s+1; x5s+2; x5s+3g; fx5s+1; x5s+3; x5s+4g; fx5s+1; x5s+4; x5s+5g; fx5s+1; x5s+2; x5s+5g;in addition, there are 22 clauses involving xr+1; : : : ; xr+21 and their complements,fxr+1; xr+7; xr+13g; fxr+2; xr+8; xr+14g; fxr+3; xr+9; xr+15g; fxr+4; xr+10; xr+16g;fxr+5; xr+11; xr+17g; fxr+6; xr+12; xr+18g; fxr+1; xr+7; xr+13g; fxr+2; xr+8; xr+14g;fxr+3; xr+9; xr+15g; fxr+4; xr+10; xr+16g; fxr+5; xr+11; xr+17g; fxr+6; xr+12; xr+18g;fxr+7; xr+13; xr+19g; fxr+8; xr+14; xr+19g; fxr+9; xr+15; xr+20g; fxr+10; xr+16; xr+20g;fxr+11; xr+17; xr+21g; fxr+12; xr+18; xr+21g; fxr+13; xr+14; xr+19g; fxr+15; xr+16; xr+20g;fxr+17; xr+18; xr+21g; fxr+19; xr+20; xr+21g:These last 22 clauses alone constitute an unsatis able formula ([4], bottom of page 56).Altogether, Ht has 8t + 22 clauses and each of these clauses has length three. It is aroutine matter to verify that jT (Ht;MAX)j = 111; we will use induction on t to prove thatjT (Ht;B)j > 2t for every branching rule B with the Sensible Property.Trivially, jT (H0;B)j > 1. Sinced3(Ht; xi) =8>>><>>>>: 4 if i = 5s+ 1; s = 0; : : : ; t 1;2 if i = 5s+ j; s = 0; : : : ; t 1; j = 2; : : : ; 5;1 if i = r + 1; : : : ; r + 6;2 if i = r + 7; : : : ; r + 12;3 if i = r + 13; : : : ; r + 21;d3(Ht; xi) =8><>: 4 if i = 5s+ 1; s = 0; : : : ; t 1;2 if i = 5s+ j; s = 0; : : : ; t 1; j = 2; : : : ; 5;1 if i = r + 1; : : : ; r + 21;any branching rule B with the Sensible Property, given Ht with t > 0, chooses some x5s+1with 0 s < t to be u. In Htjx5s+1, the four literalsx5s+2, x5s+3, x5s+4, x5s+5 are monotone; { 5 {inHtjx5s+1, the four literals x5s+2, x5s+3, x5s+4, x5s+5 are monotone. These monotone literals(together with the clauses containing them) are removed from the formulas by DPLL beforethe branching rule is consulted again. The resulting formulas,((((Htjx5s+1)jx5s+2)jx5s+3)jx5s+4)jx5s+5 and ((((Htjx5s+1)jx5s+2)jx5s+3)jx5s+4)jx5s+5;are identical and isomorphic to Ht 1 via de ned by(xi) = ( xi if i 5s;xi 5 if i > 5s+ 5:Hence jT (Ht;B)j = 1 + jT (Htjx5s+1;B)j+ jT (Htjx5s+1;B)j = 1 + 2 jT (Ht 1;B)j; now, bythe induction hypothesis, jT (Ht;B)j > 1 + 2 (2t 1) > 2t.2AcknowledgmentI wish to thank my adviser, Vasek Chvatal, for raising the question of the existenceof formulas that fool branching rules, and his encouragement and generous contribution tothis work. His careful reading and comments on an earlier version helped me improve thepresentation.References[1] M. Davis, G. Logemann, and D. Loveland, \A Machine Program for Theorem-Proving",C. ACM 5 (1962), 394{397.[2] M. Davis and H. Putnam, \A computing procedure for quanti cation theory", J. ACM7 (1960), 201{215.[3] http://dimacs.rutgers.edu/Challenges/index.html[4] O. Dubois, \On the r; s-SAT Satis ability Problem and a Conjecture of Tovey", DiscreteApplied Mathematics 26 (1990), 51{60.[5] O. Dubois, P. Andre, Y. Boufkhad, and J. Carlier, \SAT versus UNSAT", AmericanMathematical Society DIMACS Volume Series 26, to appear.[6] J. N. Hooker and V. Vinay, \Branching rules for satis ability", J. of Automated Rea-soning 15 (1995), 359{383.[7] R. G. Jeroslow and J. Wang, \Solving Propositional Satis ability Problems", Annals ofMathematics and Arti cial Intelligence 1 (1990), 167{187.[8] D. S. Johnson, \Approximation Algorithms for Combinatorial Problems", J. Computerand System Sciences 9 (1974), 256{278. { 6 {[9] D. W. Loveland, Automated Theorem Proving: A Logical Basis, North-Holland, Ams-terdam, 1978.[10] A. van Gelder and Y. K. Tsuji, \Satis ability Testing with More Reasoning and LessGuessing", American Mathematical Society DIMACS Volume Series 26, to appear.
منابع مشابه
Reduction rules and universal variables for first order tableaux and DPLL
Recent experimental results have shown that the strength of resolution, the propositional DPLL procedure, the KSAT procedure for description logics, or related tableau-like implementations such as DLP, is due to reduction rules which propagate constraints and prune the search space. Yet, for first order logic such reduction rules are only known for resolution. The lack of reduction rules for fi...
متن کاملExtending Unit Propagation Look-Ahead of DPLL Procedure
The DPLL (Davis-Putnam-Logemann-Loveland) procedure is one of the most effective methods for solving SAT problems. It is well known that its efficiency depends on the choice of the branching rule. Different branching rules are proposed in the literature. Unit propagation look-ahead (UPLA) branching rule was one of the main improvements in the DPLL procedure (e.g.,[10]). The UPLA branching rule ...
متن کاملLearning to Select Branching Rules in the DPLL Procedure for Satisfiability
The DPLL procedure is the most popular complete satisfiability (SAT) solver. While its worst case complexity is exponential, the actual running time is greatly affected by the ordering of branch variables during the search. Several branching rules have been proposed, but none is the best in all cases. This work investigates the use of automated methods for choosing the most appropriate branchin...
متن کاملOn the Power of Top-Down Branching Heuristics
We study the relative best-case performance of DPLL-based structure-aware SAT solvers in terms of the power of the underlying proof systems. The systems result from (i) varying the style of branching and (ii) enforcing dynamic restrictions on the decision heuristics. Considering DPLL both with and without clause learning, we present a relative efficiency hierarchy for refinements of DPLL result...
متن کاملAdding a New Conflict Based Branching Heuristic in two Evolved DPLL SAT Solvers
The paper is concerned with the computational evaluation of a new branching heuristic, called reverse assignment sequence (RAS), for evolved DPLL Satisfiability solvers. Such heuristic, like several other recent ones, is based on the history of the conflicts obtained during the solution of an instance. A score is associated to each literal. When a conflict occurs, some scores are incremented wi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Discrete Applied Mathematics
دوره 89 شماره
صفحات -
تاریخ انتشار 1998